package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest;

import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcargo.ManifestCargoUpdateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcntr.ManifestCntrLbsUpdateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcntr.ManifestCntrUpdateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestscn.ManifestScnUpdateReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 舱单创建 Request VO
 *
 * @author chenzheng
 */
@Schema(description = "管理后台 - 舱单创建 Request VO")
@Data
@ToString(callSuper = true)
public class ManifestAllLsbCreateReqVO {

    @Schema(description = "主舱单主键id,(创建子舱单)不填更新时必填")
    private Long manifestId;

    @Schema(description = "(创建子舱单)前端传入主仓单主键id")
    private Long manifestMasterId;

    @Schema(description = "舱单子编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 3, message = "{manifestsalve.manifestnonum.length}")
    private String manifestNoNum;

    @Schema(description = "订舱id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{manifest.soId.notblank}")
    private Long soId;

    @Schema(description = "付款方式", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.payment.notblank}")
    @Length(max = 50, message = "{manifest.payment.length}")
    private String payment;

    @Schema(description = "是否提交", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{manifest.commitFlag.notblank}")
    private Boolean commitFlag;

    @Schema(description = "货物信息")
    @NotEmpty(message = "{manifest.manifestCargoList.notblank}")
    private List<ManifestCargoUpdateReqVO> manifestCargoList;

    @Schema(description = "箱信息")
    @NotEmpty(message = "{manifest.manifestCntrList.notblank}")
    private List<ManifestCntrLbsUpdateReqVO> manifestCntrList;

    @Schema(description = "相关方")
    @NotEmpty(message = "{manifest.manifestScnList.notblank}")
    private List<ManifestScnUpdateReqVO> manifestScnList;

    @Schema(description = "创建人")
    private String creator;
}
